<?php defined('SYSPATH') or die('No direct script access.');

class Model_Forum_Subscribe extends ORM {
	
	protected $_table_name = 'forum_subscribe';
	
	protected $_primary_key = 'id';
	
	protected $_belongs_to = array(
		'user' => array(
			'model' => 'User',
			'foreign_key' => 'user_id',
		),
		'topic' => array(
			'model' => 'Forum_Topic',
			'foreign_key' => 'topic_id',
		),
	);
	
	protected $_pc_table_columns = array(
		'id' => array(
			'type' => 'INT(11)',
			'AUTO_INCREMENT' => TRUE,
		),
		'user_id' => array(
			'type' => 'INT(11)',
		),
		'topic_id' => array(
			'type' => 'INT(11)',
		),
	);
	
	protected $_pc_table_indexes = array(
		'id' => array(
			'PRIMARY_KEY' => array(),
		),
		'user_id' => array(
			'INDEX' => array('name' => 'user_id'),
		),
		'topic_id' => array(
			'INDEX' => array('name' => 'topic_id'),
		),
	);
	
}